//
//  ReminderFingerOrGesterView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/4/4.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "ReminderFingerOrGesterView.h"
#import <Masonry.h>
@implementation ReminderFingerOrGesterView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    
    self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
    
    self.topView = [[UIView alloc] init];
    self.topView.backgroundColor = [UIColor whiteColor];
    self.topView.layer.cornerRadius = 8;
    [self addSubview:self.topView];
    [self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(45);
        make.right.mas_equalTo(-45);
        make.centerY.equalTo(self);
        make.height.mas_equalTo(340);
    }];
    
    self.tipsLab = [[UILabel alloc] init];
    self.tipsLab.text = @"为了您的账户安全";
    self.tipsLab.font = [UIFont systemFontOfSize:16];
    self.tipsLab.textColor = ETColorWithRGB(51, 51, 51);
    [self.topView addSubview:self.tipsLab];
    [self.tipsLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.topView);
        make.top.mas_equalTo(40);
    }];
    
    self.openUnlockLab = [[UILabel alloc] init];
    self.openUnlockLab.text = @"请开启屏幕解锁";
    self.openUnlockLab.font = [UIFont boldSystemFontOfSize:18];
    self.openUnlockLab.textColor = ETColorWithRGB(51, 51, 51);
    [self.topView addSubview:self.openUnlockLab];
    [self.openUnlockLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.topView);
        make.top.equalTo(self.tipsLab.mas_bottom).offset(10);
    }];
    
    
    self.openFingerprintBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.openFingerprintBtn setTitle:@"开启指纹解锁" forState:(UIControlStateNormal)];
    [self.openFingerprintBtn setTitleColor:ETColorWithRGB(91, 113, 255) forState:(UIControlStateNormal)];
    self.openFingerprintBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    self.openFingerprintBtn.layer.cornerRadius = 22;
    self.openFingerprintBtn.layer.borderWidth = 1;
    self.openFingerprintBtn.layer.borderColor = ETColorWithRGB(91, 113, 255).CGColor;
    [self.topView addSubview:self.openFingerprintBtn];
    [self.openFingerprintBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(25);
        make.right.mas_equalTo(-25);
        make.height.mas_equalTo(44);
        make.top.equalTo(self.openUnlockLab.mas_bottom).offset(30);
    }];
    
    
    self.openGestureBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.openGestureBtn setTitle:@"开启手势解锁" forState:(UIControlStateNormal)];
    [self.openGestureBtn setTitleColor:ETColorWithRGB(18, 201, 199) forState:(UIControlStateNormal)];
    self.openGestureBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    self.openGestureBtn.layer.cornerRadius = 22;
    self.openGestureBtn.layer.borderWidth = 1;
    self.openGestureBtn.layer.borderColor = ETColorWithRGB(18, 201, 199).CGColor;
    [self.topView addSubview:self.openGestureBtn];
    [self.openGestureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(25);
        make.right.mas_equalTo(-25);
        make.height.mas_equalTo(44);
        make.top.equalTo(self.openFingerprintBtn.mas_bottom).offset(20);
    }];
    
    self.noReminderBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.noReminderBtn setTitle:@"不在显示" forState:(UIControlStateNormal)];
    [self.noReminderBtn setTitleColor:ETColorWithRGB(91, 113, 255) forState:(UIControlStateNormal)];
    self.noReminderBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.topView addSubview:self.noReminderBtn];
    [self.noReminderBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.openGestureBtn.mas_bottom).offset(25);
    }];
    
    self.settingOpenLab = [[UILabel alloc] init];
    self.settingOpenLab.text = @"您可前往我的-设置里进行开启";
    self.settingOpenLab.font = [UIFont systemFontOfSize:14];
    self.settingOpenLab.textColor = ETColorWithRGB(153, 153, 153);
    [self.topView addSubview:self.settingOpenLab];
    [self.settingOpenLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.topView);
        make.top.equalTo(self.noReminderBtn.mas_bottom).offset(8);
    }];
    
    
    
}

@end
